package inits

import (
	"fmt"
	"github.com/redis/go-redis/v9"
	"yzy6.26exam/golbal"
)

func RedisLink() {
	golbal.RDB = redis.NewClient(&redis.Options{
		Addr:     "14.103.158.217:6379",
		Password: "redis_x3jTtC",
		DB:       0,
	})
	if err := golbal.RDB.Set(golbal.Ctx, "trys", "ok", 0).Err(); err != nil {
		panic(err)
	}
	fmt.Println("redis link success")
}
